import request from 'src/utils/request'

const base_2 = import.meta.env.DEV ? 'http://localhost:3019/shenwenyi' : ''
const base_1 = import.meta.env.DEV ? 'http://localhost:3019/zhoupan' : ''

// 巡检任务列表
export function list(data) {
    return request({
        // url: base_2+'/serve/patrolWork/list',
        url: '/serve/patrolWork/list',
        method: 'post',
        data
    })
}


export function projectList(data) {
    return request({
        url: '/resource/village/query',
        method: 'post',
        data
    })
}

// 巡检任务删除接口
export function delRow(data) {
    return request({
        url: '/serve/patrolWork/del',
        method: 'post',
        data
    })
}

// 巡检任务新增接口
export function addRow(data) {
    return request({
        // url: base_2+ '/serve/patrolWork/add',
        url: '/serve/patrolWork/add',
        method: 'post',
        // method: 'post',
        data
    })
}

export function addPersonnel(data) {
    return request({
        url: '/serve/patrolWork/addPersonnel',
        method: 'post',
        data
    })
}

// 接单人
export function getrRepairerData(data) {
    return request({
        url: '/resource/personnel/query/job',
        // url: base_1 +'/resource/personnel/query/job',
        method: 'post',
        data
    })
}

export function getDetailById(data) {
    return request({
        url: '/serve/patrolWork/details',
        method: 'post',
        data
    })
}
